﻿
function beforeShowHandler(event) {
    babySmash.pause();
    document.getElementById('maximumShapes').value = options.maximumShapes();
    document.getElementById('sounds').value = options.soundStyle();
    document.getElementById('cursor').value = options.cursor();
    document.getElementById('characterFont').value = options.characterFont();
    document.getElementById('forceUppercase').winControl.checked = options.forceUppercase();
    document.getElementById('facesOnShapes').winControl.checked = options.facesOnShapes();
    document.getElementById('clicklessDraw').winControl.checked = options.clicklessDraw();
    document.getElementById('fadeShapes').winControl.checked = options.fadeShapes();
}
beforeShowHandler.supportedForProcessing = true;

function afterHideHandler(event) {
    storage.maximumShapes = document.getElementById('maximumShapes').value;
    storage.soundStyle = document.getElementById('sounds').value;
    storage.cursor = document.getElementById('cursor').value;
    storage.characterFont = document.getElementById('characterFont').value;
    storage.forceUppercase = document.getElementById('forceUppercase').winControl.checked;
    storage.facesOnShapes = document.getElementById('facesOnShapes').winControl.checked;
    storage.clicklessDraw = document.getElementById('clicklessDraw').winControl.checked;
    storage.fadeShapes = document.getElementById('fadeShapes').winControl.checked;
    babySmash.resume();
}
afterHideHandler.supportedForProcessing = true;